package com.mmall.service;

import com.github.pagehelper.PageInfo;
import com.mmall.common.ServerResponse;
import com.mmall.pojo.Product;
import com.mmall.vo.ProductDetailVo;

/**
 * 商品管理逻辑层接口
 * Created by qezhhnjy on 2017/9/27-22:48.
 */
public interface IProductService {
    ServerResponse productSave(Product product);

    ServerResponse setSaleStatus(Integer productId, Integer status);

    ServerResponse<ProductDetailVo> manageProductDetail(Integer productId);

    ServerResponse getList(Integer pageNum, Integer pageSize);

    ServerResponse<PageInfo> search(String productName, Integer productId, Integer pageNum, Integer pageSize);

    //
    ServerResponse<ProductDetailVo> getDetail(Integer productId);

    //前台通过商品关键字和品类id来搜索子类商品信息
    ServerResponse<PageInfo> getProductByKeywordCategory(String keyword, Integer categoryId, Integer pageNum, Integer pageSize, String orderBy);
}
